import createPersistedState from 'vuex-persistedstate'

export default ({ store }) => {
  window.onNuxtReady(() => {
    createPersistedState({
      key:"user",
      storage: window.localStorage,
      paths: ['user']
    })(store)
  })
  window.onNuxtReady(() => {
    createPersistedState({
      key:"profile",
      storage: window.localStorage,
      paths: ['profile']
    })(store)
  })
  window.onNuxtReady(() => {
    createPersistedState({
      key:"general",
      storage: window.localStorage,
      paths: ['general']
    })(store)
  })
}
